home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
MacHack 1995
/
MacHack 1995.toast
/
Presentations
/
Presentations ’88
/
Feldt's Object Stuff
/
SSG include
/
viewMgr.h
< prev
next >
Wrap
Text File
|
1987-03-24
|
4KB
|
86 lines
/* - View Manager™ - */
/* Small Systems Guild */
/* private library header file */
/* copyright © 1987 Small Systems Guild */
/* Lightspeed C compiler 2.01 */
/* DAF 11/07/86 Created this file from view manager design docs 0.1 */
/* DAF 01/14/87 modified data structures and added routine defs 0.2 */
/* DAF 02/03/87 modified data structures and routine definitions 0.3 */
/* DAF 03/24/87 modified and integrated into Interchange code 0.4 */
#include <extender.h>
#define VIEW_MANAGER /* header already included indication flag */
#define TEXT_ITEM 1 /* ASCII text, static, edit, interactive... */
#define CHARMAP_ITEM 2 /* character graphic data, low resolution! */
#define BITMAP_ITEM 3 /* bit mapped graphic data, picture or icon */
#define PICT_ITEM 4 /* object oriented graphic data, PICT format*/
#define BUTTON_ITEM 10 /* pushbutton or target area for clicking */
#define CHECKBOX_ITEM 11 /* checkbox boolean, displays true or false */
#define RADIOBOX_ITEM 12 /* radio button boolean, displays true/false*/
#define SCROLLBAR_ITEM 16 /* scrollbar, displays/sets range of values */
#define MENU_ITEM 20 /* selectable item from set of menu options */
#define LIST_ITEM 50 /* list of options, list manager on Mac */
typedef char ** TextHandle;
struct ItemRecord {
long id; /* unique item identification # */
long modDate; /* date and time last modified */
long security; /* item access and protection */
Handle data; /* item data structure handle */
long flags; /* item function/behavior flags */
Rect itemRect; /* item display rect within view*/
TextHandle itemText; /* item title or reference str */
TextHandle helpText; /* item help text & information */
int type; /* list, control, text, pict... */
};
typedef struct ItemRecord ItemRecord;
typedef struct ItemRecord * ItmRecPtr;
typedef struct ItemRecord ** ItmRecHndl;
struct ViewRecord {
long viewID; /* unique view identification # */
long modDate; /* date and time last modified */
long security; /* access and protection flags */
long domain; /* info types and categories */
long context; /* info subcategories and level */
ItmRecHndl *item; /* pointer to item Handle array */
int itemCount; /* number of items in item list */
int display; /* display type, unit type */
Rect viewRect; /* view size in pixel/char units*/
int viewType; /* menu, form, frame, cine, etc.*/
int viewFrame; /* Mac window type, else border */
int defaultItem; /* view default item# (if any) */
long viewFlags; /* view function/behavior flags */
long parent; /* previous/backtrack viewID */
WindowPtr viewWindow; /* window/route view drawn in */
TextHandle viewText; /* view title or reference str */
TextHandle helpText; /* view help text & information */
};
typedef struct ViewRecord ViewRecord;
typedef struct ViewRecord * VRecPtr;
typedef struct ViewRecord ** VRecHndl;
OSErr CrtView(); /* create view from ViewRecord */
OSErr GetView(); /* get view data from res & crt */
OSErr SaveView(); /* save ViewRecord to res fork */
OSErr InitView(); /* init ViewRec data to defaults*/
OSErr KillView(); /* remove view, reclaim memory */
void ShowView(); /* make view visible and update */
void HideView(); /* erase view, make invisible */
ItmRecHndl DoView(); /* handle user events in view */
OSErr CrtItem(); /* create item from ItemRecord */
OSErr GetItem(); /* get item data from res & crt */
OSErr SaveItem(); /* save ItemRecord to res fork */
OSErr InitItem(); /* init ItemRec data to defaults*/
OSErr KillItem(); /* remove item, reclaim memory */
void ShowItem(); /* make item visible and update */
void HideItem(); /* erase item, make invisible */
long DoItem(); /* handle user events in item */